<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:73:"D:\phpstudy_pro\WWW\nmg002\public/../application/home\view\set\index.html";i:1657952453;s:68:"D:\phpstudy_pro\WWW\nmg002\application\home\view\public\footer3.html";i:1654363884;}*/ ?>

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>修改密码</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <link rel="shortcut icon" href="/public/static/admin/uploads/set/<?php echo $setting['ico']; ?>">
    <link href="/public/static/home/themes/css/login.css" rel="stylesheet">
    <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/base.css">
    <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/home.css">
    <script type="text/javascript" src="/public/static/home/themes/js/jquery.min.js"></script>
    <script type="text/javascript" src="/public/static/home/themes/js/slider.js"></script>
    <script type="text/javascript" src="/public/static/home/themes/js/tab.js"></script>
    <style>
        *{font-size:14px;}
    </style>
</head>

<body>
<section class="aui-flexView">
    <header class="aui-navBar aui-navBar-fixed b-line">
        <a href="javascript:history.back(-1)" class="aui-navBar-item">
            <i class="icon icon-return"></i>
        </a>
        <div class="aui-center">
            <span class="aui-center-title">修改密码</span>
        </div>
    </header>
    <section class="aui-scrollView">
            <form name="forms" method="post" class="login-cont">
                <ul>

                    <li  style=" padding:0px;height: auto">
                        <span id="box"><input type="password"  name="password1" placeholder="请输入您的旧密码" id="password1"/></li>
                    <li  style=" padding:0px;height: auto">
                        <span id="box"><input type="password"  name="password2" placeholder="请输入您的新密码" id="password2"/></li>
                    <li  style=" padding:0px;height: auto">
                        <span id="box"><input type="password"  name="password3" placeholder="请再次输入您的密码" id="password3"/></li>
                </ul>
                <a href="javascript:;"  class="button text-center block" id="login">保存</a>
            </form>
    </section>
<link href="/public/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<footer class="aui-footer">
    <a href="<?php echo url('Indexs/index'); ?>" class="aui-tabBar-item ">
            <span class="aui-tabBar-item-icon">
                <i class="icon icon-home"></i>
            </span>
        <span class="aui-tabBar-item-text">首页</span>
    </a>
    <a href="<?php echo url('My/register'); ?>" class="aui-tabBar-item ">
            <span class="aui-tabBar-item-icon">
                <i class="fa fa-user-plus" style="font-size:18px !important;"></i>
            </span>
        <span class="aui-tabBar-item-text">我要报名</span>
    </a>
    <!--<a href="news.html" class="aui-tabBar-item">-->
    <!--    <span class="aui-tabBar-item-icon">-->
    <!--        <i class="icon icon-find"></i>-->
    <!--    </span>-->
    <!--    <span class="aui-tabBar-item-text">消息</span>-->
    <!--</a>-->
    <!--<a href="community.html" class="aui-tabBar-item">-->
    <!--    <span class="aui-tabBar-item-icon">-->
    <!--        <i class="icon icon-comm"></i>-->
    <!--    </span>-->
    <!--    <span class="aui-tabBar-item-text">社区</span>-->
    <!--</a>-->
    <a href="<?php echo url('My/index'); ?>" class="aui-tabBar-item aui-tabBar-item-active">
            <span class="aui-tabBar-item-icon">
                <i class="icon icon-car"></i>
            </span>
        <span class="aui-tabBar-item-text">我的</span>
    </a>
</footer>
</section>
<script src="/public/static/admin/layui/layui.js"></script>
<script type="text/javascript">
    layui.use('upload', function() { //独立版的layer无需执行这一句
        var $ = layui.jquery, layer = layui.layer,upload = layui.upload; //独立版的layer无需执行这一句
        //登录
        $("#login").click(function () {

            //判断密码是否为空
            if($("#password1").val() == ""){
                $("#password1").focus();
                layer.msg("请输入旧的密码", {time: 2000});
                return false;
            }
            //判断密码是否为空
            if($("#password2").val() == ""){
                $("#password2").focus();
                layer.msg("请输入新的密码", {time: 2000});
                return false;
            }
            //判断密码是否为空
            if($("#password3").val() == ""){
                $("#password3").focus();
                layer.msg("请再次输入密码", {time: 2000});
                return false;
            }
            //判断两次密码是否一致
            if($("#password2").val() != $("#password3").val()){
                $("#password3").focus();
                layer.msg("两次密码不一致,请重新输入", {time: 2000});
                return false;
            }

            $.post("<?php echo url('Set/updatePwd'); ?>",{pwd1:$("#password1").val(),pwd2:$("#password2").val()},function(data){
                layer.msg(data.msg,{time:2000,shade:0.5},function(){
                    if(data.url){
                        window.location.href = data.url;
                    }
                });
            });

        });

    });


</script>

</body>
</html>
